import datetime
import time


def test_time():
    today = datetime.date.today()
    now_time = time.mktime(today.timetuple())
    now = datetime.datetime.fromtimestamp(now_time)
    print(now)


# 方法必须先声明后使用
if __name__ == '__main__':
    test_time()
